<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<base href="<?php echo base_url(); ?>" />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
		<title><?php echo $template['title']; ?></title> 		
		<link rel="stylesheet" href="themes/admin/media/css/pagination.css" type="text/css" media="screen" charset="utf-8" />		
		<link rel="stylesheet" href="themes/admin/media/css/stylesheet.css" type="text/css" media="screen" charset="utf-8" />
		<link rel="stylesheet"  type="text/css" href="js/jquery.datepick/redmond.datepick.css"  />
		<link rel="stylesheet" type="text/css" media="screen"  href="css/colorbox.css" /> 
		<link rel="stylesheet"  href="css/jquery.treeview.css" />
		<link rel="stylesheet" href="css/iphone_checkbox.css" type="text/css" media="screen" charset="utf-8" />
		<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/redmond/jquery-ui.css" />
		<link type="text/css" rel="stylesheet" href="css/ui.notify.css" />	
  
		<script src="js/jquery-1.6.4.min.js" type="text/javascript"></script>
		<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.js" type="text/javascript"></script>
		<script src="js/jquery.colorbox.js" type="text/javascript"></script>        
   		<script src="js/jquery.rowcount-1.0.js" type="text/javascript"></script>
   		<script src="js/jquery.treeview.js" type="text/javascript"></script>
   		<script src="js/jquery.meio.mask.js" type="text/javascript"></script>
   		<script src="js/NumberFormat154.js" type="text/javascript"></script>        
        <script type="text/javascript" src="js/jquery.datepick/jquery.datepick.js"></script>
		<script language="javascript" type="text/javascript" src="tiny_mce/tiny_mce.js"></script>		
  		<script src="js/iphone-style-checkboxes.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/jquery.notify.min.js" type="text/javascript"></script>  				
		<script type="text/javascript" src="js/validate.js"></script>
		<script type="text/javascript" src="js/jquery.livequery.js"></script>  			  				
		<script type="text/javascript">
		function ajaxfilemanager(field_name, url, type, win) {
			var ajaxfilemanagerurl = "../../tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php";
			switch (type) {
				case "image":
					break;
				case "media":
					break;
				case "flash": 
					break;
				case "file":
					break;
				default:
					return false;
			}
            tinyMCE.activeEditor.windowManager.open({
                url: "../tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php",
                width: 782,
                height: 550,
                inline : "yes",
                close_previous : "no"
            },{
                window : win,
                input : field_name
            });            
}
			tinyMCE.init({
			//mode : "exact",
			//elements : "myeditor",
			//mode : "textareas",
			mode : "specific_textareas",
        	editor_selector : "myeditor",
			width:650,
			height : 150,			
			theme : "advanced",
			plugins : "advimage,advlink,media,contextmenu,paste",
		theme_advanced_buttons1 : "forecolor,backcolor,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
        theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,cleanup,help,code",
        theme_advanced_buttons3 : "",
        theme_advanced_buttons4 : "",

			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			extended_valid_elements : "hr[class|width|size|noshade]",
			file_browser_callback : "ajaxfilemanager",
			paste_use_dialog : false,
			theme_advanced_resizing : true,
			theme_advanced_resize_horizontal : true,
			apply_source_formatting : true,
			force_br_newlines : true,
			force_p_newlines : false,	
			relative_urls : false,
			 paste_auto_cleanup_on_paste : true,
			paste_preprocess : function(pl, o) {
				// Content string containing the HTML from the clipboard
//				alert(o.content);
//				o.content = "-: CLEANED :-\n" + o.content;
				o.content = "\n" + o.content;
			},
			paste_postprocess : function(pl, o) {
				// Content DOM node containing the DOM structure of the clipboard
//				alert(o.node.innerHTML);
//				o.node.innerHTML = o.node.innerHTML + "\n-: CLEANED :-";
				o.node.innerHTML = o.node.innerHTML + "\n";
			}			
		})
		$(document).ready(function(){
			$('.datepicker').datepick({showOn: 'both', buttonImageOnly: true, buttonImage: 'js/jquery.datepick/calendar_ico.gif'});
		})
</script>    
		
	</head>
	<body> 
	<div id="header"><?php include_once('_header.inc.php'); ?></div> 
		<div id="container">
			<div id="menu"><?php include_once '_menu.inc.php'; ?></div> 
			<div id="content"><div class="inner"><?php echo $template['body']; ?></div></div> 
		</div> 
		 
	</body>
</html>